home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Video Toaster 4.0
/
Video Toaster v4.0.iso
/
arexx
/
switcher
/
toastcmdtest.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1993-12-13
|
2KB
|
83 lines
/* ToastCmdTest.rexx -- Test Toaster ARexx command host */
/* By Arnie Cachelin © 1992 NewTek Inc. */
/*
This program demonstrates the Toaster Command Host Interface, which is
implemented in the ARexx program ToasterCommandHost.rexx. It runs through
a bunch of commands, with no apparent reason or rhyme. Why? Because it can!
Don't think too much about the similarity between this and the genlock demo.
*/
options RESULTS /* Ask ARexx to pass command results along to us */
port=TOASTER_COMMAND_HOST
HOST_EXIT='HOST_EXIT'
IF ~SHOW('Ports',PORT) THEN DO
Say "Can't find "port
say "running ToasterCommandHost"
ADDRESS COMMAND "run rx ToasterCommandHost"
ADDRESS COMMAND "wait 3 secs"
IF ~SHOW('Ports',PORT) THEN DO
Say "Can't run ToasterCommandHost"
exit
END
END
ADDRESS TOASTER_COMMAND_HOST
MDV1
PDV2
MEDM
AUTO
/* Build a handy-dandy array of commands to loop through automagically */
cmd.1='M001'
cmd.2='M002'
cmd.4='M003'
cmd.3='M004'
cmd.5='MDV1'
cmd.6='MDV2'
cmd.7='O001'
cmd.8='ODV1'
cmd.9='TAKE'
cmd.10='AUTO'
cmd.11='P001'
cmd.12='P002'
cmd.14='P003'
cmd.13='P004'
cmd.15='PDV1'
cmd.16='PDV2'
cmd.17='ODV2'
cmd.18='DOEN'
cmd.19='SLOW'
cmd.20='LVID'
cmd.21='FAST'
cmd.22='TBAR'
cmd.23='KEYM'
cmd.24='FVID'
say "Looping through some Toaster commands..."
do i=1 to 23
interpret cmd.i
say "command: "cmd.i" Return Code: "RC" Result: "RESULT
end
MDV1
PDV2
FMLD 000
TAKE
do i=0 to 511 by 20
say tbar i
tbar i
end
do i=0 to 511 by 20
say tbar 500-i
tbar 511-i
end
say 'Shutting down command host'
HOST_EXIT
say 'Exiting'